RESTful Engine Java Client Reference
This article describes how to get the Fluent RESTful V2 Java Client installed, as well as a list of all methods and models defined in the client.
#
Setting Up the Clientnote
To see a sample application using the Fluent RESTful V2 JavaClient, please refer to our sample Java application github page.
You can add the client as a Maven package to your POM file:
- Maven package name: WindwardRESTJava8Client
- Maven package latest version: 22.1.0.0
You then want to import the Client class, and instantiate an instance of the client:
#
Client Modelsinfo
This section will go over the relevant models associated with the client that you will use.
To import the models into your project, use:
import WindwardRestApi.src.Model;
#
TemplateThese are the parameters for the Template object constructor:
Here are the different constructors for the Template object:
Only set the input parameters that apply to your report. You must have either the data input parameter or the connectionString input parameter set.
#
XML 1.0 Data SourceThese are the input parameters for the XML 1.0 data source constructor:
Here are the different constructors for the Xml_10DataSource object:
#
SQL Data SourceThese are the input parameters for the SQL data source constructor:
Here is the constructor for the SqlDataSource object:
#
Salesforce OAuth Data SourceThese are the input parameters for the SalesforceOauth data source constructor:
Here is the constructor for the SalesforceOAuthDataSourceobject:
#
Salesforce Data SourceThese are the input parameters for the Salesforce data source constructor:
Here is the constructor for the SalesforceDataSource object:
#
OData Data SourceThese are the input parameters for the OData data source constructor:
Here is the constructor for the ODataDataSource object:
#
JSON Data SourceThese are the input parameters for the JSON data source constructor:
Here arethe constructors for the JsonDataSource object:
#
ParameterThese are the input parameters for the Parameter constructor:
(Parameter value explained next) The template object takes in a list of Parameter objects, so if you have multiple, append them to an array and pass them in that way.
#
Client Methods#
Client ConstructorInput Parameters:
This is how you would call it:
#
Client.GetVersion()This method is used to get the version information with regards to the server and the local client. No input parameters. How to call:
Returns version data
#
Client.PostDocument(Template t)This method is used to post the constructed template object to the RESTful engine. Takes in a Template object How to call:
Returns a document object.
#
Client.GetDocumentStatus(string GUID)This method is used to get the status of the document being processed. You MUST use this method to check the status of the document before getting the document back. How to call:
This is how we recommend using this in your application:
We need to wait until GetDocumentStatus() returns 302. The method returns Http status codes.
#
Client.GetDocument(string GUID)This method is used to get the document after its done processing. You pass to it the Guid:
This method returns the document object.
#
Client.DeleteDocument(string guid)This method is used to delete the document after its done processing. You pass to it the Guid: